import { Controller, Get, Post, Req, Res } from '@nestjs/common'
import { AppService } from './app.service'
import { Request, Response } from 'express'

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {
  }

  @Get()
  getHello(): string {
    return this.appService.getHello()
  }

  @Post()
  add(@Req() req: Request, @Res() res: Response) {
    console.log(req.body)
    res.send({ code: 200, msg: 'ok' });
  }

}


// @Controller()
// export class MerchantController {
//   constructor(private readonly MerchantService: MerchantService) { }

//   @Get('a')
//   getHello() {
//     return this.MerchantService.getMerchant();
//   }

// }